The present invention generally relates to processing of color images and more particularly to a method for smoothing a color boundary between an object and a background.
In designing various colorful goods or products such as cloths or automobiles, a computerized design system is employed. In such a computerized design system that uses a computer and a color monitor, a color image of the product is produced on the color monitor. By changing the color of the product, one can evaluate the visual effect of the product without producing a prototype each time. Generally, such a computerized design system is equipped with a sophisticated human interface for facilitating the operation by the operator.
Conventionally, the modification of color in the color images has been achieved in such a computerized design system by pointing out the image or object displayed in the color monitor, and the color of the pointed object is modified to a target color. The target color may be selected from a color pallet that is displayed on the color monitor as an array of small color elements. Alternatively, the target color may be obtained by actuating various adjustment knobs displayed on the monitor screen by means of the pointing device such as a mouse. By adjusting the color with respect to the three independent components thereof such as lightness, chroma and hue or with respect to the three primary colors such as R (red), G (green) and B (blue), one can obtain any color as desired.
In such a computerized designing of color, the boundary between a pointed object and the background that surrounds the pointed object has been treated either as a part of the object or as a part of the background. When synthesizing a color image from a plurality of color images, an object image located behind another object is treated as a background.
Conventionally, no particular treatment has been applied to the boundary part of such images except for applying a brushing operation in correspondence to the boundary part or applying a blur to the entirety of the image. However, these conventional processes do not provide the desired effect of smoothing the color boundary. Particularly, the brushing operation has to be achieved manually by an operator, and such a process requires substantial time. As a result, there has been a problem in that the boundary part of the composite image appears unnatural to the human perception. Hereinafter, the cause of this problem will be examined in detail.
As already explained, the target color is selected from the color pallet displayed on the monitor screen, and the color of the whole object is changed to the target color. For example, a color picture may be read by an image scanner to produce RGB image data that includes 8-bit data, for example, for each of the R, G and B components. After a part of the color picture is selected by the pointer device and the color thereof changed to the target color, there occurs a problem in that the part that has experienced the color change appears conspicuous to the human perception and provides an unnatural feeling. More specifically, the smooth transition of the color at the boundary part of the object is lost after the color adjustment, and it is believed that a steep change of the color that appears at the boundary as a result of the color adjustment provides the odd feeling to the viewer. There, the viewer feels that the boundary of the object is unnaturally enhanced.
When reading a boundary part of a color image by means of an image scanner, camera, and the like, two colors, one forming a background part of the color image and the other forming an object surrounded by the background, are mixed at the CCD cell or other photoelectric conversion device that has a finite area for optical detection. As represented in FIG. 1 showing a typical situation for reading a color image, it will be noted that each pixel of the detector cell detects the reflection of light from a region larger than the region of the original picture that corresponds to the pixel. In other words, each pixel detects the image in a somewhat defocused state. The reason of this may be attributed to the limited resolution of the optical system. Anyway, the pixel detects an intermediate color that is not included in any of the background and the object as a result of the additive mixture of color stimuli. Thus, it is believed that this mixing of color at the boundary of the object is the reason why the original color image could provide the natural feeling of images. The foregoing boundary of images provides a problem also when synthesizing images. For example, an image of an automobile incorporated into a new background by the computerized designing apparatus generally provides an odd feeling.
In addition to the foregoing problem of boundary processing, one tends to experience a similar problem of unnatural boundary caused by the operational principle of conventional image scanners.
Referring to FIG. 2 showing a conventional image scanner of the contact scanning type, an array of photodetector devices is employed. There, the array includes a repetition of three detectors corresponding to the three primary colors R, G and B, wherein these three detectors are separated from each other by a minute but finite distance. In other words, the photodetectors for the R, G and B components are not located exactly at the identical position, and there can be a problem in that these photodetectors may produce, in correspondence to the boundary of the object, a color output that never appears as a result of the simple additive mixture of color stimuli as indicated in FIG. 3. In FIG. 3, it will be noted that there appears an orange color in correspondence to the boundary of a white object surrounded by a black background.
FIG. 4 shows another typical construction of the image scanner that switches the light source consecutively for the red color, green color and blue color. Again, it will be noted that an orange color is produced at the boundary between the white image and the black background.